<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

<meta name="theme-color" content="#222">



  
  
    
    
  <script src="/clysheng.oschina.me/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/clysheng.oschina.me/lib/pace/pace-theme-minimal.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/clysheng.oschina.me/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/clysheng.oschina.me/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/clysheng.oschina.me/css/main.css?v=5.1.3" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/clysheng.oschina.me/images/apple-touch-icon-next.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="32x32" href="/clysheng.oschina.me/images/favicon-32x32-next.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="16x16" href="/clysheng.oschina.me/images/favicon-16x16-next.png?v=5.1.3">


  <link rel="mask-icon" href="/clysheng.oschina.me/images/logo.svg?v=5.1.3" color="#222">





  <meta name="keywords" content="java8,Optional," />










<meta name="description" content="null引发的问题null最常见带来的问题就是NullPointerException，即使在我们认为可能出现null的地方加上if语句判断，任然会频发的和它打交道，而且还会代码出现很多的if嵌套，被它的概念提出者Tony Hoare称之为价值百万的失误 Optional的作用能非常清晰地界定出变量值的缺失是结构上的问题，还是你算法上的缺陷，抑或是你数据中的问题。另外，我们还想特别强调，引入Opt">
<meta name="keywords" content="java8,Optional">
<meta property="og:type" content="article">
<meta property="og:title" content="Optional">
<meta property="og:url" content="http://clysheng.gitee.io/2018/01/09/java8 Optional.1/index.html">
<meta property="og:site_name" content="Harvey&#39;s blog">
<meta property="og:description" content="null引发的问题null最常见带来的问题就是NullPointerException，即使在我们认为可能出现null的地方加上if语句判断，任然会频发的和它打交道，而且还会代码出现很多的if嵌套，被它的概念提出者Tony Hoare称之为价值百万的失误 Optional的作用能非常清晰地界定出变量值的缺失是结构上的问题，还是你算法上的缺陷，抑或是你数据中的问题。另外，我们还想特别强调，引入Opt">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-01-10T04:02:10.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Optional">
<meta name="twitter:description" content="null引发的问题null最常见带来的问题就是NullPointerException，即使在我们认为可能出现null的地方加上if语句判断，任然会频发的和它打交道，而且还会代码出现很多的if嵌套，被它的概念提出者Tony Hoare称之为价值百万的失误 Optional的作用能非常清晰地界定出变量值的缺失是结构上的问题，还是你算法上的缺陷，抑或是你数据中的问题。另外，我们还想特别强调，引入Opt">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/clysheng.oschina.me/',
    scheme: 'Pisces',
    version: '5.1.3',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: 'AUMEJKQV9O',
      apiKey: '41a7b28b82fc9c14c1b4ffa6173ff625',
      indexName: 'harveyblog',
      hits: "",
      labels: ""
    }
  };
</script>



  <link rel="canonical" href="http://clysheng.gitee.io/2018/01/09/java8 Optional.1/"/>





  <title>Optional | Harvey's blog</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/clysheng.oschina.me/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Harvey's blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">无论工作多忙，计划都要坚持</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/clysheng.oschina.me/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/clysheng.oschina.me/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/clysheng.oschina.me/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/clysheng.oschina.me/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  
  <div class="algolia-popup popup search-popup">
    <div class="algolia-search">
      <div class="algolia-search-input-icon">
        <i class="fa fa-search"></i>
      </div>
      <div class="algolia-search-input" id="algolia-search-input"></div>
    </div>

    <div class="algolia-results">
      <div id="algolia-stats"></div>
      <div id="algolia-hits"></div>
      <div id="algolia-pagination" class="algolia-pagination"></div>
    </div>

    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
  </div>




    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://clysheng.gitee.io/clysheng.oschina.me/2018/01/09/java8 Optional.1/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Harvey">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/clysheng.oschina.me/images/jianchi.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Harvey's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Optional</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-01-09T09:30:00+08:00">
                2018-01-09
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/clysheng.oschina.me/categories/java8/" itemprop="url" rel="index">
                    <span itemprop="name">java8</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="page-pv">本文总阅读量
            <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>次
            </span>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="null引发的问题"><a href="#null引发的问题" class="headerlink" title="null引发的问题"></a>null引发的问题</h2><p>null最常见带来的问题就是<strong><em>NullPointerException</em></strong>，即使在我们认为可能出现null的地方加上if语句判断，任然会频发的和它打交道，而且还会代码出现很多的if嵌套，被它的概念提出者Tony Hoare称之为价值百万的失误</p>
<h2 id="Optional的作用"><a href="#Optional的作用" class="headerlink" title="Optional的作用"></a>Optional的作用</h2><p>能非常清晰地界定出变量值的缺失是结构上的问题，还是你算法上的缺陷，抑或是你数据中的问题。另外，我们还想特别强调，引入Optional 类的意图并非要消除每一个null引用。与此相反，它的目标是帮助你更好地设计出普适的API， 让程序员看到方法签名，就能了解它是否接受一个Optional的值。这种强制会让你更积极地将 变量从Optional中解包出来，直面缺失的变量值。</p>
<h2 id="如何使用"><a href="#如何使用" class="headerlink" title="如何使用"></a>如何使用</h2><h3 id="创建Optional对象"><a href="#创建Optional对象" class="headerlink" title="创建Optional对象"></a>创建Optional对象</h3><h4 id="声明一个空的Optional"><a href="#声明一个空的Optional" class="headerlink" title="声明一个空的Optional"></a>声明一个空的Optional</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Optional&lt;Car&gt; car = Optional.empty() ;</span><br></pre></td></tr></table></figure>
<h4 id="依据一个非空值创建Optional"><a href="#依据一个非空值创建Optional" class="headerlink" title="依据一个非空值创建Optional"></a>依据一个非空值创建Optional</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Car car = null ;</span><br><span class="line">Optional&lt;Car&gt; carOpt = Optional.of(car) ;</span><br></pre></td></tr></table></figure>
<p>如果car是一个空值，这段代码会立即抛出<strong><em>NullPointerException</em></strong>，而不是等到试图访问car属性的时候</p>
<h4 id="可接受null的Optional"><a href="#可接受null的Optional" class="headerlink" title="可接受null的Optional"></a>可接受null的Optional</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Car car = null ;</span><br><span class="line">Optional&lt;Car&gt; carOpt = Optional.ofNullable(car) ;</span><br></pre></td></tr></table></figure>
<p>如果car是空那么carOpt就是一个空对象，获取对象中的值的时候依然会抛出异常</p>
<h3 id="一点注意"><a href="#一点注意" class="headerlink" title="一点注意"></a>一点注意</h3><p>Optional在设计的时候没有考虑做为类的字段使用，所以它并未实现序列化接口，所以某些要求序列的库或框架中使用Optional有可能会引发应用故障<br></p>
<h2 id="常用API"><a href="#常用API" class="headerlink" title="常用API"></a>常用API</h2><table>
<thead>
<tr>
<th>方法</th>
<th style="text-align:center">描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>empty</td>
<td style="text-align:center">返回一个空的 Optional 实例</td>
</tr>
<tr>
<td>flatMap</td>
<td style="text-align:center">如果值存在，就对该值执行提供的 mapping 函数调用，返回一个 Optional 类型的值，否则就返回一个空的 Optional 对象</td>
</tr>
<tr>
<td>get</td>
<td style="text-align:center">如果该值存在，将该值用 Optional 封装返回，否则抛出一个 NoSuchElementException 异常</td>
</tr>
<tr>
<td>ifPresent</td>
<td style="text-align:center">如果值存在，就执行使用该值的方法调用，否则什么也不做</td>
</tr>
<tr>
<td>isPresent</td>
<td style="text-align:center">如果值存在就返回 true，否则返回 false</td>
</tr>
<tr>
<td>map</td>
<td style="text-align:center">如果值存在，就对该值执行提供的 mapping 函数调用</td>
</tr>
<tr>
<td>of</td>
<td style="text-align:center">将指定值用 Optional 封装之后返回，如果该值为 null，则抛出一个 NullPointerException 异常</td>
</tr>
<tr>
<td>ofNullable</td>
<td style="text-align:center">将指定值用 Optional 封装之后返回，如果该值为 null，则返回一个空的 Optional 对象</td>
</tr>
<tr>
<td>orElse</td>
<td style="text-align:center">如果有值则将其返回，否则返回一个默认值</td>
</tr>
<tr>
<td>orElseGet</td>
<td style="text-align:center">如果有值则将其返回，否则返回一个由指定的 Supplier 接口生成的值</td>
</tr>
<tr>
<td>orElseThrow</td>
<td style="text-align:center">如果有值则将其返回，否则抛出一个由指定的 Supplier 接口生成的异常</td>
</tr>
</tbody>
</table>
<h2 id="实战例子"><a href="#实战例子" class="headerlink" title="实战例子"></a>实战例子</h2><p>返回一个正整数，如果小于0或者不存在则返回0<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">Properties properties = new Properties() ;</span><br><span class="line">properties.put(&quot;a&quot;,1) ;</span><br><span class="line">properties.put(&quot;b&quot;,-5) ;</span><br><span class="line">properties.put(&quot;c&quot;,1) ;</span><br><span class="line"></span><br><span class="line"> public int getValueOptional(Properties properties,String name)&#123;</span><br><span class="line">    return Optional.ofNullable(properties.getProperty(name)).flatMap(OptionalTest::stringToInt).filter(i -&gt; i&gt;0).orElse(0) ;</span><br><span class="line">&#125;</span><br><span class="line">public static Optional&lt;Integer&gt; stringToInt(String s) &#123;</span><br><span class="line">    try &#123;</span><br><span class="line">        return Optional.of(Integer.parseInt(s));</span><br><span class="line">    &#125; catch (NumberFormatException e) &#123;</span><br><span class="line">        return Optional.empty();</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>通过这个例子可以看出，Optional加入丰富了语意，减少了之前很多不必要的if判断，代码更简洁直观</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/clysheng.oschina.me/tags/java8/" rel="tag"># java8</a>
          
            <a href="/clysheng.oschina.me/tags/Optional/" rel="tag"># Optional</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/clysheng.oschina.me/2018/01/06/工作中一次触发器的使用/" rel="next" title="工作中一次触发器的使用">
                <i class="fa fa-chevron-left"></i> 工作中一次触发器的使用
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/clysheng.oschina.me/2018/01/10/同时发布到Coding和GitHub的方法/" rel="prev" title="同时发布到Coding和GitHub的方法">
                同时发布到Coding和GitHub的方法 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/clysheng.oschina.me/images/jianchi.jpg"
                alt="Harvey" />
            
              <p class="site-author-name" itemprop="name">Harvey</p>
              <p class="site-description motion-element" itemprop="description">再牛逼的梦想，也抵不过傻逼式的坚持</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/clysheng.oschina.me/archives/">
              
                  <span class="site-state-item-count">10</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/clysheng.oschina.me/categories/index.html">
                  <span class="site-state-item-count">6</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/clysheng.oschina.me/tags/index.html">
                  <span class="site-state-item-count">9</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          

          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-inline">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                Links
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="http://tengj.top/" title="嘟嘟独立博客" target="_blank">嘟嘟独立博客</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://fubin.org.cn/" title="Fubin's Blog" target="_blank">Fubin's Blog</a>
                  </li>
                
              </ul>
            </div>
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#null引发的问题"><span class="nav-number">1.</span> <span class="nav-text">null引发的问题</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Optional的作用"><span class="nav-number">2.</span> <span class="nav-text">Optional的作用</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#如何使用"><span class="nav-number">3.</span> <span class="nav-text">如何使用</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#创建Optional对象"><span class="nav-number">3.1.</span> <span class="nav-text">创建Optional对象</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#声明一个空的Optional"><span class="nav-number">3.1.1.</span> <span class="nav-text">声明一个空的Optional</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#依据一个非空值创建Optional"><span class="nav-number">3.1.2.</span> <span class="nav-text">依据一个非空值创建Optional</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#可接受null的Optional"><span class="nav-number">3.1.3.</span> <span class="nav-text">可接受null的Optional</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#一点注意"><span class="nav-number">3.2.</span> <span class="nav-text">一点注意</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#常用API"><span class="nav-number">4.</span> <span class="nav-text">常用API</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#实战例子"><span class="nav-number">5.</span> <span class="nav-text">实战例子</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Harvey</span>

  
</div>




<div>
  本站总访问量<span id="busuanzi_value_site_pv"></span>次
  本站访客数<span id="busuanzi_value_site_uv"></span>人次
</div>




        
<div class="busuanzi-count">
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  

  
</div>








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/clysheng.oschina.me/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/clysheng.oschina.me/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/clysheng.oschina.me/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/clysheng.oschina.me/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/clysheng.oschina.me/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/clysheng.oschina.me/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/clysheng.oschina.me/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/clysheng.oschina.me/js/src/utils.js?v=5.1.3"></script>

  <script type="text/javascript" src="/clysheng.oschina.me/js/src/motion.js?v=5.1.3"></script>



  
  


  <script type="text/javascript" src="/clysheng.oschina.me/js/src/affix.js?v=5.1.3"></script>

  <script type="text/javascript" src="/clysheng.oschina.me/js/src/schemes/pisces.js?v=5.1.3"></script>



  
  <script type="text/javascript" src="/clysheng.oschina.me/js/src/scrollspy.js?v=5.1.3"></script>
<script type="text/javascript" src="/clysheng.oschina.me/js/src/post-details.js?v=5.1.3"></script>



  


  <script type="text/javascript" src="/clysheng.oschina.me/js/src/bootstrap.js?v=5.1.3"></script>



  


  




	





  





  












  




  
  
  
  <link rel="stylesheet" href="/clysheng.oschina.me/lib/algolia-instant-search/instantsearch.min.css">

  
  
  <script src="/clysheng.oschina.me/lib/algolia-instant-search/instantsearch.min.js"></script>
  

  <script src="/clysheng.oschina.me/js/src/algolia-search.js?v=5.1.3"></script>



  

  

  

  
  

  

  

  




</body>
</html>
